import time
import threading

lst = []
def func1(num):
    for i in range(num):
        time.sleep(.2)
        lst.append(i)
    print("func1", lst, id(lst))

def func2(num):
    for i in range(num):
        time.sleep(.2)
        lst.append(i)
    print("func2", lst, id(lst))

if __name__ == '__main__':
    # func1()
    # func2()
    print(lst, id(lst))
    t1 = threading.Thread(target=func1, args=(10,))
    t2 = threading.Thread(target=func2, kwargs={"num": 10})

    t1.start()
    t2.start()
    time.sleep(1)
    print("结束了")
